package com.rd.student.jike.class4.xiayinyin.week04.day26;

import java.io.File;

//对文件夹的处理
public class Demo02 {
    public static void main(String[] args) {
        String projectPath = System.getProperty("user.dir");
        System.out.println(projectPath);
        File file = new File(projectPath +"/"+"file2");
        System.out.println(file.getAbsolutePath());
        Boolean result = file.mkdir();
        if (result){
            System.out.println("文件夹创建成功");
        }else{
            System.out.println("文件创建失败");
        }
        //删除方式不区分文件或文件夹
        Boolean result1 = file.delete();
        if (result1){
            System.out.println("文件夹删除成功");
        }else {
            System.out.println("文件夹删除失败");
        }
    }
}
